﻿namespace CollisionDetection.Models
{
    using System;
    using System.Configuration;
    using System.IO;

    public class AppSettings : ApplicationSettingsBase
    {
        [UserScopedSettingAttribute()]
        [DefaultSettingValueAttribute(@"..\..\..\data")]
        public String CsvPath
        {
            get { return Path.GetFullPath((String)this["CsvPath"]); }
            set { this["CsvPath"] = value; }
        }

        [UserScopedSettingAttribute()]
        [DefaultSettingValueAttribute(@"..\..\..\xml")]
        public String XmlPath
        {
            get { return Path.GetFullPath((String)this["XmlPath"]); }
            set { this["XmlPath"] = value; }
        }

        [UserScopedSettingAttribute()]
        [DefaultSettingValueAttribute(@"colisoes.xls")]
        public String ExcelFilename
        {
            get { return Path.GetFullPath((String)this["ExcelFilename"]); }
            set { this["ExcelFilename"] = value; }
        }

        [UserScopedSettingAttribute()]
        [DefaultSettingValueAttribute("tiXml")]
        public EnumTipoImportacao TipoImportacao
        {
            get { return (EnumTipoImportacao)this["TipoImportacao"]; }
            set { this["TipoImportacao"] = value; }
        }

        [UserScopedSettingAttribute()]
        [DefaultSettingValueAttribute("47")]
        public int SelectedWeek
        {
            get { return (int)this["SelectedWeek"]; }
            set { this["SelectedWeek"] = value; }
        }

        [UserScopedSettingAttribute()]
        [DefaultSettingValueAttribute("toWebService")]
        public EnumTipoOrigem TipoOrigemDados
        {
            get { return (EnumTipoOrigem)this["TipoOrigemDados"]; }
            set { this["TipoOrigemDados"] = value;}
        }
    }

}